package com.cos.lession72.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author: COS
 * @time: 2022/9/28 14:43
 * @description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class User {
    private Integer id;
    private Integer age;
    private String name;
    private String sex;
    private Double salary;
    /**
     * 日期需要使用 spring 注解 设置日期格式
     * 接受字符串的日期类型的参数时,帮助我们自己进行转换为date
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date time;

    private String[] hobby;

    private String city;

}
